﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Smith.ImageConverter
{
    public class HeightResize : BaseResize, IResize
    {
        public HeightResize(int height)
        {
            NewHeight = height;
        }

        protected override Size GetNewSize(int width, int height)
        {
            return new Size(
                Convert.ToInt32((float)width * (float)NewHeight / (float)height), 
                NewHeight);
        }

        public int NewHeight { get; private set; }
    }
}
